package com.zyx.eduservice.controller;

import com.zyx.commonutils.R;
import org.springframework.web.bind.annotation.*;

/**
 * @author zyx
 * @version 1.0
 * @date 2022/1/5 005 12:47
 */

@RestController
@RequestMapping("/eduservice/user")
//@CrossOrigin
public class EduLoginController {

    @PostMapping("login")
    public R login() {
        return R.ok().data("token", "admin");
    }

    @GetMapping("info")
    public R info() {
        return R.ok().data("roles","[admin]").data("name","admin").data("avatar","https://tse1-mm.cn.bing.net/th/id/OIP-C.NwmsLxSz__v_TvCFZLQ8aAHaJu?pid=ImgDet&rs=1");
    }
}
